import { onMounted, getCurrentInstance } from "vue";
import _ from "lodash";

// 主要用于设置分享参数
export const useShare = (ops) => {
    const instance = getCurrentInstance();

    const setShareOps = (params) => {
        (_.isPlainObject(params) && !_.isEmpty(params)) && Object.assign(instance.data.shareOps, params);
    }
    onMounted(() => {
        // setShareOps(ops);
    });

    return {
        setShareOps,
    }
};